from flask import current_app
from app import create_app,db, models
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
# 调用app
from app.models import User

app = create_app('develop')


manager = Manager(app)
# 将app跟迁移关联
Migrate(app, db)
# 生成数据库迁移命令
manager.add_command('db', MigrateCommand)



if __name__ == '__main__':

    manager.run()